package com.dream.service.user.domain.entity;

import com.dream.service.user.domain.model.UserModel;
import com.dream.service.user.domain.model.UserReturnInfoModel;

import java.io.Serializable;

/**
* Created by kangd on 2016/3/24.
*/
public class User implements Serializable{
    private String uuid;

    private String pin; //pin

    private String token;

    private String nickname; //昵称

    private String icon; //头像

    private Integer user_type; //用户类型

    private Integer user_level; //用户等级

    private Integer status_code; //状态码

    private Integer login_type; //登录类型，具体到哪个平台

    private String login_email; //登录邮箱

    private UserReturnInfoModel return_info; //返回信息，用于第三方登录

    private Integer user_score; //用户评分

    private Integer isHistoricalUser; //是否历史用户

    /**
     * 自己邀请别人的唯一邀请码
     * 因为这个是根据用户的id生成的，所以得显性调用set方法
     */
    private String invite_code;

    /**
     * 分流标志
     */
    private int route;

    private Long tokenTtl;

    /**
     * 是否网红：0否1是
     */
    private int netred;

    public User(){}

    public User(String uuid, String pin, String token, String nickname, String icon, Integer user_type,
                Integer user_level, Integer status_code, Integer login_type, String login_email,
                UserReturnInfoModel return_info, Integer user_score,Integer isHistoricalUser) {
        this.uuid = uuid;
        this.pin = pin;
        this.token = token;
        this.nickname = nickname;
        this.icon = icon;
        this.user_type = user_type;
        this.user_level = user_level;
        this.status_code = status_code;
        this.login_type = login_type;
        this.login_email = login_email;
        this.return_info = return_info;
        this.user_score = user_score;
        this.isHistoricalUser = isHistoricalUser;
    }

    public User(String uuid,String token,UserModel userModel){
        this.uuid = uuid;
        this.token=token;
        this.pin = userModel.getPin();
        this.nickname = userModel.getNickname();
        this.icon = userModel.getIcon();
        this.user_type = userModel.getUser_type();
        this.user_level = userModel.getUser_level();
        this.status_code = userModel.getStatus_code();
        this.login_type = userModel.getLogin_type();
        this.login_email = userModel.getLogin_email();
        this.return_info = userModel.getReturn_info();
        this.user_score = userModel.getUser_score();
        this.isHistoricalUser = userModel.getIsHistoricalUser();
        this.netred = userModel.getNetred();
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getPin() {
        return pin;
    }

    public void setPin(String pin) {
        this.pin = pin;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getUser_type() {
        return user_type;
    }

    public void setUser_type(Integer user_type) {
        this.user_type = user_type;
    }

    public Integer getUser_level() {
        return user_level;
    }

    public void setUser_level(Integer user_level) {
        this.user_level = user_level;
    }

    public Integer getStatus_code() {
        return status_code;
    }

    public void setStatus_code(Integer status_code) {
        this.status_code = status_code;
    }

    public Integer getLogin_type() {
        return login_type;
    }

    public void setLogin_type(Integer login_type) {
        this.login_type = login_type;
    }

    public String getLogin_email() {
        return login_email;
    }

    public void setLogin_email(String login_email) {
        this.login_email = login_email;
    }

    public UserReturnInfoModel getReturn_info() {
        return return_info;
    }

    public void setReturn_info(UserReturnInfoModel return_info) {
        this.return_info = return_info;
    }

    public Integer getUser_score() {
        return user_score;
    }

    public void setUser_score(Integer user_score) {
        this.user_score = user_score;
    }

    public Integer getIsHistoricalUser() {
        return isHistoricalUser;
    }

    public void setIsHistoricalUser(Integer isHistoricalUser) {
        this.isHistoricalUser = isHistoricalUser;
    }

    public String getInvite_code() {
        return invite_code;
    }

    public void setInvite_code(String invite_code) {
        this.invite_code = invite_code;
    }

    public int getRoute() {
        return route;
    }

    public void setRoute(int route) {
        this.route = route;
    }

    public Long getTokenTtl() {
        return tokenTtl;
    }

    public void setTokenTtl(Long tokenTtl) {
        this.tokenTtl = tokenTtl;
    }

    public int getNetred() {
        return netred;
    }

    public void setNetred(int netred) {
        this.netred = netred;
    }
}
